package com.wangshouyu.mp.offiaccount.message;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.wangshouyu.mp.message.MpNewsMessage;

import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 13:57
 * @description 客服新闻消息
 */
public class KfMpNewsMessage extends BaseKfMessage{

    /**
     * 微信新闻
     */
    @SerializedName(value = "mpnews")
    @JsonProperty(value = "mpnews")
    @JSONField(name = "mpnews")
    private MpNewsMessage mpNews;

    public MpNewsMessage getMpNews() {
        return mpNews;
    }

    public void setMpNews(MpNewsMessage mpNews) {
        this.mpNews = mpNews;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        KfMpNewsMessage that = (KfMpNewsMessage) o;
        return Objects.equals(mpNews, that.mpNews);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), mpNews);
    }

    @Override
    public String toString() {
        return "KfMpNewsMessage{" +
                "mpNews=" + mpNews +
                '}';
    }
}
